* Created using Stata 14 (for Windows and Linux)
clear all
set more off
cd "I:\coercive_and_catalytic_replication\appendix"
use "I:\coercive_and_catalytic_replication\analysis.dta" 

******************************
* APPENDIX TABLES AND FIGURES
******************************

* Generate lists of recipient and donor countries in sample 
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor
* Recipient List
tab recipientname if e(sample)
tab recipientcode if e(sample)
* Donor List
tab donorname if e(sample)
* Year List
tab year if e(sample)
* Limit Descriptive Statistics and demeaned variables to observations within sample
gen in_sample=1 if e(sample)

**************************
* Descriptive Statistics *
**************************

estpost tabstat lneconaidpc lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned lngdp_L1_demeaned lnpop_L1_demeaned hhi_recip_L1_demeaned highdissent_L1 conflict_L1 statist_donor if in_sample==1, c(stat) stat(mean sd min max n)

esttab, ///
 cells("sum(fmt(%13.0fc)) mean(fmt(%13.2fc)) sd(fmt(%13.2fc)) min max count") nonumber ///
  nomtitle nonote noobs label collabels("Sum" "Mean" "SD" "Min" "Max" "N")

esttab using "summary_statistics.tex", replace ////
 cells("sum(fmt(%13.0fc)) mean(fmt(%13.2fc)) sd(fmt(%13.2fc)) min max count") nonumber ///
  nomtitle nonote noobs label booktabs f ///
  collabels("Sum" "Mean" "SD" "Min" "Max" "N")

* Calculate percent zero
gen econaidbinary=0
replace econaidbinary=1 if lneconaidpc>0
replace econaidbinary=. if in_sample==.
tab econaidbinary

gen govaidbinary=0
replace govaidbinary=1 if lngovaidpc>0
replace govaidbinary=. if in_sample==.
tab govaidbinary

*******************************************
* PREPARE DATA FOR MARGINAL EFFECTS PLOTS *
*******************************************
set scheme plotplainblind

summarize repression_L1_demeaned
return list
global repress_hi=round(r(mean)+r(sd),0.1)
global repress_avg=round(r(mean),0.1)
global repress_lo=round(r(mean)-r(sd),0.1)

summarize idealptdist_L1_demeaned
return list
global idealpt_hi=round(r(mean)+r(sd),0.1)
global idealpt_avg=round(r(mean),0.1)
global idealpt_lo=round(r(mean)-r(sd),0.1)

summarize donorrights_L1_demeaned
return list
global drights_hi=round(r(mean)+r(sd),0.1)
global drights_avg=round(r(mean),0.1)
global drights_lo=round(r(mean)-r(sd),0.1)

summarize xdem_L1_demeaned
return list
global xdem_hi=round(r(mean)+r(sd),0.1)
global xdem_avg=round(r(mean),0.1)
global xdem_lo=round(r(mean)-r(sd),0.1)

summarize statecap_L1_demeaned
return list
global statecap_hi=round(r(mean)+r(sd),0.1)
global statecap_avg=round(r(mean),0.1)
global statecap_lo=round(r(mean)-r(sd),0.1)

summarize lnexport_L1_demeaned
return list
global lnexp_hi=round(r(mean)+r(sd),0.1)
global lnexp_avg=round(r(mean),0.1)
global lnexp_lo=round(r(mean)-r(sd),0.1)

summarize shame_physint_L1_demeaned
return list
global shame_hi=round(r(mean)+r(sd),0.1)
global shame_avg=round(r(mean),0.1)
global shame_lo=round(r(mean)-r(sd),0.1)

summarize ln_terror_events_L1_demeaned
return list
global terror_hi=round(r(mean)+r(sd),0.1)
global terror_avg=round(r(mean),0.1)
global terror_lo=round(r(mean)-r(sd),0.1)

set more off
xtset dyad_id year

*********************
* ROBUSTNESS CHECKS *
*********************

* OMITTING RECIPIENT OUTLIERS (GLOBAL WAR ON TERROR TARGETS, SMALL ISLAND COUNTRIES)
preserve 

drop if recipientname=="Iraq"
drop if recipientname=="Afghanistan"
drop if recipientname=="Libya"
drop if recipientname=="Sudan"
drop if recipientcow==667

drop if recipientname=="Marshall Islands"
drop if recipientname=="Kiribati"
drop if recipientname=="Palau"
drop if recipientname=="Nauru"
drop if recipientname=="Tuvalu"
drop if recipientname=="Micronesia"
drop if recipientname=="Cabo Verde"
drop if recipientname=="Tonga"
drop if recipientname=="Vanuatu"
drop if recipientname=="Samoa"
drop if recipientname=="Solomon Islands"
drop if recipientname=="Sao Tome and Principe"

set more off
xtset dyad_id year


* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_recip_outliers.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_recip_outliers.xls", label replace excel
restore

* OMITTING SMALL DONORS

preserve
drop if donorname=="Czech Republic"
drop if donorname=="Greece"
drop if donorname=="Hungary"
drop if donorname=="Iceland"
drop if donorname=="Luxembourg"
drop if donorname=="Poland"
drop if donorname=="Slovak Republic"
drop if donorname=="Slovenia"

set more off
xtset dyad_id year

* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_small_donor.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_small_donor.xls", label replace excel

restore

* OMITTING UNITED STATES

preserve

drop if donorname=="United States"

set more off
xtset dyad_id year


* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_usa.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_usa.xls", label replace excel
restore



* OLS ESTIMATOR



* Model 1: Economic Aid Base
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year, cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
reg lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m8_econ_shaming

global econreg m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econreg}] using "econ_table_ols.xls", label replace excel

* Model 9: Governance Aid Base
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year , cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
reg lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned, cl(donorcode)
est sto m16_gov_shaming

global govreg m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govreg}] using "gov_table_ols.xls", label replace excel




* Time series charts for recipient-year variables
preserve 

set scheme plotplainblind

sort recipientcode year
by recipientcode year: gen seq = _n
keep if seq == 1

tsset recipientcode year

* Drop recipients with too little data availability to be in final sample
drop if recipientname=="West Bank and Gaza Strip"
drop if recipientname=="Turks and Caicos Islands"
drop if recipientname=="Tuvalu"
drop if recipientname=="Tonga"
drop if recipientname=="Samoa"
drop if recipientname=="Saint Kitts and Nevis"
drop if recipientname=="Saint Lucia"
drop if recipientname=="Saint Vincent and the Grenadines"
drop if recipientname=="Palau"
drop if recipientname=="Belize"
drop if recipientname=="Kiribati"
drop if recipientname=="Marshall Islands"
drop if recipientname=="Nauru"
drop if recipientname=="Dominica"
drop if recipientname=="Grenada"
drop if recipientname=="Micronesia"

* Shorten some recipient names to fit graphs
replace recipientname="DR Congo" if recipientname=="Democratic Republic of the Congo"
replace recipientname="China" if recipientname=="China (People's Republic of)"
replace recipientname="North Korea" if recipientname=="Democratic People's Republic of Korea"
replace recipientname="Lao PDR" if recipientname=="Lao People's Democratic Republic"
replace recipientname="Bosnia & Herzegovina" if recipientname=="Bosnia and Herzegovina"
replace recipientname="Sao Tome & Principe" if recipientname=="Sao Tome and Principe"

* Time series plots for recipient-year variables
twoway (tsline repression_L1_demeaned), by(recipientname)
graph save Graph "graphs\ts_recip_violence.gph"
twoway (tsline xdem_L1_demeaned), by(recipientname)
graph save Graph "graphs\ts_recip_xdem.gph"
twoway (tsline statecap_L1_demeaned), by(recipientname)
graph save Graph "graphs\ts_recip_statecap.gph"
twoway (tsline ln_terror_events_L1_demeaned), by(recipientname)
graph save Graph "graphs\ts_recip_terror.gph"

restore

* Time series charts for donor-year variables
preserve 
set scheme plotplainblind

sort donorcode year
by donorcode year: gen seq = _n
keep if seq == 1

tsset donorcode year
   
twoway (tsline donorrights_L1_demeaned), by(donorname)
graph save Graph "graphs\ts_donor_rights.gph"

restore 

* Note: UN Ideal Point Distance and Ln Exports are dyad-year variables. 
* Due to the number of dyads, I do not include time-series plots for these variables.



* REGION FIXED EFFECTS

set more off

* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_region_fe.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.regioncode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_region_fe.xls", label replace excel



* REGION FIXED EFFECTS

set more off

* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_recip_fe.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.recipientcode shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_recip_fe.xls", label replace excel



* DONOR-REGION-YEAR FIXED EFFECTS

set more off

* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_3fe_donor_region_yr.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.regioncode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_3fe_donor_region_yr.xls", label replace excel



* DONOR-RECIPIENT-YEAR FIXED EFFECTS

set more off

* Model 1: Economic Aid Base
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year, ll(0) cl(donorcode)
est sto m1_econ_base

* Model 2: Econ Donor Rights
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m2_econ_donorrights

* Model 3: Econ Ideal Point
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m3_econ_idealpt

* Model 4: Econ Export
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m4_econ_lnexport

* Model 5: Econ Executive Constraints
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m5_econ_execconst

* Model 6: Econ State Capacity
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m6_econ_statecap

* Model 7: Econ Terrorism
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m7_econ_terror

* Model 8: Econ Shaming
tobit lneconaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m8_econ_shaming


global econtobit m1_econ_base m2_econ_donorrights m3_econ_idealpt m4_econ_lnexport m5_econ_execconst m6_econ_statecap m7_econ_terror m8_econ_shaming
outreg2 [${econtobit}] using "econ_table_3fe_donor_recip_yr.xls", label replace excel

* Model 9: Governance Aid Base
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year , ll(0) cl(donorcode)
est sto m9_gov_base

* Model 10: Governance Donor Rights
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.donorrights_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m10_gov_donorrights

* Model 11: Governance Ideal Point
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.idealptdist_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m11_gov_idealpt

* Model 12: Governance Export
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.lnexport_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m12_gov_lnexport

* Model 13: Governance Executive Constraints
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.xdem_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m13_gov_execconst

* Model 14: Governance State Capacity
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.statecap_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m14_gov_statecap

* Model 15: Governance Terrorism 
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year c.ln_terror_events_L1_demeaned#c.repression_L1_demeaned, ll(0) cl(donorcode)
est sto m15_gov_terror

* Model 16: Governance Shaming
tobit lngovaidpc repression_L1_demeaned donorrights_L1_demeaned idealptdist_L1_demeaned lnexport_L1_demeaned xdem_L1_demeaned statecap_L1_demeaned ln_terror_events_L1_demeaned 1.highdissent_L1 lngdp_L1_demeaned lnpop_L1_demeaned conflict_L1 hhi_recip_L1_demeaned statist_donor i.donorcode i.recipientcode i.year shame_physint_L1_demeaned c.shame_physint_L1_demeaned#c.repression_L1_demeaned , ll(0) cl(donorcode)
est sto m16_gov_shaming

global govtobit m9_gov_base m10_gov_donorrights m11_gov_idealpt m12_gov_lnexport m13_gov_execconst m14_gov_statecap m15_gov_terror m16_gov_shaming
outreg2 [${govtobit}] using "gov_table_3fe_donor_recip_yr.xls", label replace excel


